*Paper: Fiscal Rules, Corruption and Electoral Accountability - Replication Files

clear all
cap log close 
set more off


**Global files
global folder "/Users/tommasogiommoni/Dropbox/Determinants of corruption/Stability pact and corruption/Replication files JOP"


********************************************************************************
****----						Dataset open 					    	----**** 
********************************************************************************

use "$folder/Data/FigureA10.dta", clear

**-- Global

global controls7 proportion_female_Elected_lag av_education_Elected_lag av_age_Elected_lag  victory_margin_lag term_limit_lag 
global controls7_int  c.proportion_female_Elected_lag##i.anno c.av_education_Elected_lag##i.anno c.av_age_Elected_lag##i.anno c.victory_margin_lag##i.anno  c.term_limit_lag##i.anno

**-- Panel dataset

xtset codcom anno
fvset base 2012 anno

********************************************************************************
****----							Analysis							----**** 
********************************************************************************

****---- Regressions

qui reghdfe corruption_PC_sd S##T S##ES_post2013_V2 P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store robustness_1

qui reghdfe corruption_PC_sd S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA") & border2==0, absorb(codcom) vce(cluster codcom)
est store robustness_2
 
qui reghdfe corruption_PC_sd S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA") & border==0, absorb(codcom) vce(cluster codcom)
est store robustness_3

qui reghdfe corruption_PC_sd S##T P i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA") & commissioner_gvt_mun==0, absorb(codcom) vce(cluster codcom)
est store robustness_4

qui reghdfe corruption_PC_sd S##T P population_anagrafe_V##post_2012 i.region_year $controls7_int if abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store robustness_5

reghdfe corruption_PC_sd S##T P i.region_year $controls7_int if violazione!=1 & abs(P)<2500 & FURs==0 & (special_region==0 | regione=="SICILIA" | regione=="SARDEGNA"), absorb(codcom) vce(cluster codcom)
est store robustness_6

****---- Figure

coefplot (robustness_1, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue) lwidth(*0.75 *1.25)) mlabels(1.S#1.T = 12 "Test for gender quotas") mlabcolor(midblue)) ///
(robustness_6, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue)) mlabels(1.S#1.T = 12 "Without cities violating the DSP") mlabcolor(midblue)) ///
(robustness_2, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue)) mlabels(1.S#1.T = 12 "Without cities in the border with NARs (Province)") mlabcolor(midblue)) ///
(robustness_3, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue)) mlabels(1.S#1.T = 12 "Without cities in the border with NARs (Region)") mlabcolor(midblue)) ///
(robustness_5, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue)) mlabels(1.S#1.T = 12 "With the control population_ventile*post2012") mlabcolor(midblue)) ///
(robustness_4, mcolor(midblue) ciopts(recast(rcap) color(midblue midblue)) mlabels(1.S#1.T = 12 "Without cities under commissioner government") mlabcolor(midblue)) ///
, omitted keep(1.S#1.T) xline(0) graphregion(color(white)) legend(off) xlabel(-0.2(0.05)0.1) ///
coeflabels(1.S#1.T = `" "') ylabel(, notick labgap(0))
gr export "$folder/Figures/FigureA10.png" , replace 

